package com.course.controller;

import com.course.pojo.Course;
import com.course.pojo.ResultDTO;
import com.course.service.CourseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/course")
@CrossOrigin
public class CourseController {

    @Autowired
    private CourseService courseService;

    @PostMapping
    public ResultDTO addlist(@RequestBody Course course){
        courseService.addlist(course);
        return  new ResultDTO(true,"添加成功");
    }


}
